package cn.yunlang.zhangZhongFei.exception;

import lombok.Getter;


@Getter
public class ErrorCodeException extends RuntimeException {

    private final Integer code;
    private final String msg;

    public ErrorCodeException(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public ErrorCodeException(ErrorCodeExceptionEnum errorCodeExceptionenum) {
        this(errorCodeExceptionenum.getCode(), errorCodeExceptionenum.getMsg());
    }

}
